Wraps a nkAstraeus::UbyteArrayData and offer functions for use in scripting.
More...
Wraps a nkAstraeus::UbyteArrayData and offer functions for use in scripting.
◆ updateEnvironment()
Updates a given environment and set it up to use all functions wrapped by this wrapper.
- Parameters
-
env | The environment to set up. |
◆ constructor()
Wrapper function for the constructor of the user type.
local t = nkUbyteArray.new(10) ;
- Parameters
-
stack | The parameter stack, containing an int for the size of the array wanted. |
- Returns
- An output value with the user type and data allocated.
◆ destructor()
static void nkAstraeus::lua::UbyteArrayWrapper::destructor |
( |
void * |
toDestroy | ) |
|
|
static |
Wrapper function for the destructor of the user type.
- Parameters
-
toDestroy | The data that has to be freed. |
◆ getDataStr()
Wrapper function for the ArrayData::_ptr attribute reading, casted as a string.
local d = t.dataStr ;
- Parameters
-
data | The data from which the attribute will be retrieved. |
- Returns
- The attribute value, as a string.
◆ getData()
Wrapper function for the ArrayData::_ptr attribute reading.
local d = t.data ;
- Parameters
-
data | The data from which the attribute will be retrieved. |
- Returns
- The attribute value, as a nkAstraeus::UbyteArrayData.
◆ getSize()
Wrapper function for the ArrayData::_size attribute reading.
local d = t.size ;
- Parameters
-
data | The data from which the attribute will be retrieved. |
- Returns
- The attribute value.
◆ subView()
◆ fromString()
Utility function to populate the data from a string.
local t = nkUbyteArray.new(1):fromString("Hey") ;
- Parameters
-
stack | The parameter stack. |
- Returns
- The output value, a nkAstraeus::UbyteArrayData.
◆ readDouble()
Utility function to read an entry in an array as a double (8 bytes float).
local t = array:readDouble(0) ;
- Parameters
-
stack | The parameter stack, containing an int for the offset in the array to read from. |
- Returns
- The output value, a double.
◆ writeDouble()
Utility function to write a double (8 bytes float) within an array.
local t = array:writeDouble(0, 50.4) ;
- Parameters
-
stack | The parameter stack, containing an int for the offset in the array to write to, and the value. |
- Returns
- The output value, empty.
◆ readString()
Utility function to read an entry in an array as a string.
local t = array:readString(0) ;
- Parameters
-
stack | The parameter stack, containing an int for the offset in the array to read from. |
- Returns
- The output value, a string.
◆ writeString()
Utility function to write a string within an array.
local t = array:writeString(0, "Hey") ;
- Parameters
-
stack | The parameter stack, containing an int for the offset in the array to write to, and the value. |
- Returns
- The output value, empty.
The documentation for this class was generated from the following file: